<template>
	<view>
		<view class="yyBtnWrap">
			<template  v-if="jfTag == 0 && couponPrice == 0">
				<view class="left noFlex">
					<text class="hjTxt hasMargL">合计:</text>
					<text class="unit">¥</text>
					<text class="priceNum">{{totalPrice}}</text>
				</view>
			</template>
			<template v-if="jfTag == 1 && couponPrice == 0">
				<view class="left hasFlex">
					<view>
						<text class="hjTxt">合计:</text>
						<text class="unit">¥</text>
						<text class="priceNum">{{actMoney}}</text>
					</view>
					<view class="smTips">(总金额¥{{totalPrice}}-积分抵扣¥{{dkPrice}})</view>
				</view>
			</template>
			<template v-if="jfTag == 0 && couponPrice > 0">
				<view class="left hasFlex">
					<view>
						<text class="hjTxt">合计:</text>
						<text class="unit">¥</text>
						<text class="priceNum">{{actMoney}}</text>
					</view>
					<view class="smTips">(总金额¥{{totalPrice}}-优惠券抵扣¥{{couponPrice}})</view>
				</view>
			</template>
			<template v-if="jfTag == 1 && couponPrice > 0">
				<view class="left hasFlex">
					<view>
						<text class="hjTxt">合计:</text>
						<text class="unit">¥</text>
						<text class="priceNum">{{actMoney}}</text>
					</view>
					<view class="smTips">(总金额¥{{totalPrice}}-积分抵扣¥{{dkPrice}}-优惠券抵扣¥{{couponPrice}})</view>
				</view>
			</template>
			<view class="btn" @tap="goPay">确认预约</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			upTag:Number,
			totalPrice:Number,
			dkPrice:Number,
			jfTag:Number,
			actMoney:Number,
			couponPrice:Number
		},
		methods:{
			goPay(){
				this.$emit('goPay')
			}
		}
	}
</script>

<style lang='scss' scoped>
	.yyBtnWrap{
		width: 100%;
		height: 100rpx;
		background: #fff;
		display: flex;
		align-items: center;
		justify-content: space-between;
		box-shadow: 0 -3rpx 8rpx rgba(0,0,0,.05);
		.btn{
			width: 200rpx;
			height: 70rpx;
			line-height: 70rpx;
			background: $pss-color-primary_1;
			color: $pss-colorFFF;
			border-radius: 50rpx;
			text-align: center;
			margin-right: 30rpx;
			font-size: $font-size30;
		}
		.left{
			height: 100%;
			font-size: $font-size26;
			.hjTxt{
				color: $pss-text-color3;
				margin-left: 30rpx;
				&.hasMargL{
					margin-right: 10rpx; 
				}
			}
			.unit,
			.priceNum{
				color: $pss-color-red;
			}
			.priceNum{
				font-size: $font-size34;
				font-weight: bold;
			}
			&.noFlex{
				line-height: 100rpx;
			}
			&.hasFlex{
				flex-direction: column;
				justify-content: center;
				.smTips{
					font-size: 24rpx;
					color: $pss-color-red;
					opacity: .8;
					margin-left: 30rpx;
				}
			}
		}
	}
</style>